package com.yingsheng.bi.hks.web.controller;

import com.yingsheng.bi.hks.dto.servicedetail.*;
import com.yingsheng.bi.hks.dto.serviceinfo.*;
import com.yingsheng.bi.hks.feign.client.ServiceInfoFeignClient;
import com.yingsheng.bi.hks.service.servicedetail.ServiceDetailMgmtService;
import com.yingsheng.bi.hks.service.serviceinfo.ServiceInfoMgmtService;
import com.yingsheng.bi.hks.template.annotation.Template;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RestController;

/**
 * 分类信息管理
 *
 * @author 83686
 */
@RestController
public class ServiceInfoCtrl implements ServiceInfoFeignClient {

    @Autowired
    private ServiceInfoMgmtService serviceInfoMgmtService;
    @Autowired
    private ServiceDetailMgmtService serviceDetailMgmtService;

    @Template(name = "accessTransTemplate")
    @Override
    public ServiceInfoAddRes add(@Validated ServiceInfoAddReq req) {
        return serviceInfoMgmtService.add(req);
    }

    @Template(name = "accessTransTemplate")
    @Override
    public ServiceInfoModRes mod(@Validated ServiceInfoModReq req) {
        return serviceInfoMgmtService.mod(req);
    }

    @Template(name = "publicQueryTemplate")
    @Override
    public ServiceInfoQryRes qry(@Validated ServiceInfoQryReq req) {
        return serviceInfoMgmtService.qry(req);
    }

    @Template(name = "accessTransTemplate")
    @Override
    public ServiceInfoDelRes del(@Validated ServiceInfoDelReq req) {
        return serviceInfoMgmtService.del(req);
    }

    @Template(name = "accessTransTemplate")
    @Override
    public ServiceDetailAddRes add(@Validated ServiceDetailAddReq req) {
        return serviceDetailMgmtService.add(req);
    }

    @Template(name = "accessTransTemplate")
    @Override
    public ServiceDetailModRes mod(@Validated ServiceDetailModReq req) {
        return serviceDetailMgmtService.mod(req);
    }

    @Template(name = "publicQueryTemplate")
    @Override
    public ServiceDetailQryRes qry(@Validated ServiceDetailQryReq req) {
        return serviceDetailMgmtService.qry(req);
    }

    @Template(name = "accessTransTemplate")
    @Override
    public ServiceDetailDelRes del(@Validated ServiceDetailDelReq req) {
        return serviceDetailMgmtService.del(req);
    }

    @Template(name = "accessQueryTemplate")
    @Override
    public ServerOrderListQryRes serverOrderListQry(@Validated ServerOrderListQryReq req) {
        return serviceInfoMgmtService.serverOrderListQry(req);
    }

    @Template(name = "accessQueryTemplate")
    @Override
    public ServerOrderDetailQryRes serverOrderDetailQry(@Validated ServerOrderDetailQryReq req) {
        return serviceInfoMgmtService.serverOrderDetailQry(req);
    }
}
